/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kotionokyurievna.gmail.com.genproj.logic;

/**
 *
 * @author Kateryna_Reznik
 */
public class Orange extends Fruit{
    private String country;

    public Orange(){
        setCountry("USA");
    }
    
    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }
    
    public boolean equals( Object obj ){
        
        if ( obj != null && getClass() == obj.getClass() ){
            Orange other = (Orange) obj;
            return country.equals(other.country);
	}
        return false;
    }
    
    public String toString(){
        return super.toString() + " [ country = " + getCountry() + "]";
    }
}
